<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>机加工时统计</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <input type="hidden" th:value="${proCode}" name="proCode">
                        <input type="hidden" th:value="${special}" name="special">
                        <input type="hidden" th:value="${part}" name="part">
                        <input type="hidden" th:value="${typeId}" name="typeId">
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    let table;

    $(function () {

        /** 主表 */
        table = js.table.init({
            url: ctx + "summary/sumMachin/list",
            exportOptions : {
            },
            columns: [
                {
                    title: '序号', field: 'id', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "项目编号", field: 'prodNo'},
                {title: "项目名称", field: 'proName'},
                {title: "部分", field: 'part'},
                {title: "工序", field: 'process'},
                {title: "设备", field: 'equName'},
                {title: "工时", field: 'total',
                    formatter: function (value, row) {
                        return (value + row.workTimeTwo).toFixed(2)
                    }
                },
            ]
        });

    });
</script>
</body>
</html>
